<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/m1reader.js" charset="utf-8"></script>
<title>M1卡读取</title>
<script type="text/javascript">
$(document).ready(function(){
	init_proc(0);
	$("#read").click(function(){
		var r=search_card(0);
		//var r3=pass_check(0,1,1,1);
		var data=read_rfid(0,4);
		var len=data.substr(0,2);
		var l=parseInt(len,16);
		var no=data.substr(2,l);
		$("#cardno").val(no);
	});
	$("#close").click(function(){
		exit_proc(0);
	});
});
</script>
</head>
<body>
<div id="rfCon" style="display:none;">
<OBJECT id="rfobj" 
	  classid="clsid:ABB9DC99-B5F3-45DC-AAF1-286F96820F6E"
	  codebase="rfid_ocx.ocx#version=1,0,0,0"
	  width="320"
	  height="230"
	  align="middle"
	  hspace="0"
	  vspace="0"
	  type="hidden">
</OBJECT>
</div>
<input type="text" id="cardno" name="cardno" size="19" width="20"/> <button id="read">读取</button><button id="close">关闭</button>
</body>
</html>